// 设备数量统计
<template>
  <el-card class="box-card">
    <div class="title">
      <div class="title_box">
        <div class="title_icon"></div>
        <div class="title_value">设备数量统计(块)</div>
      </div>
      <div class="title_more">
        <img src="../../assets/icons/more.png" alt="" class="more_img" />
      </div>
    </div>
    <div class="device_detail">
      <el-row :gutter="10">
        <el-col :span="8">
          <div class="deviceStic_item deviceStic_item1">
            <div class="deviceStic_item_lf">
              <div class="deviceStic_title">表计设备总数</div>
              <div class="deviceStic_num">{{ info.meterCount }}</div>
            </div>
            <div class="deviceStic_icon">
              <img src="./images/deviceStic1.png" />
            </div>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="deviceStic_item deviceStic_item2">
            <div class="deviceStic_item_lf">
              <div class="deviceStic_title">物联网表</div>
              <div class="deviceStic_num">{{ info.meterNetCount }}</div>
            </div>
            <div class="deviceStic_icon">
              <img src="./images/deviceStic2.png" />
            </div>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="deviceStic_item deviceStic_item3">
            <div class="deviceStic_item_lf">
              <div class="deviceStic_title">注册设备数</div>
              <div class="deviceStic_num">{{ info.meterActiveNetCount }}</div>
            </div>
            <div class="deviceStic_icon">
              <img src="./images/deviceStic3.png" />
            </div>
          </div>
        </el-col>
      </el-row>
    </div>
  </el-card>
</template>
<script>
import { meterquantityList } from '@/api/dashboard.js'

export default {
  data() {
    return {
      info: {
        meterCount: 0,
        meterNetCount: 0,
        meterActiveNetCount: 0,
      }
    };
  },
  mounted() {
    meterquantityList().then((res) => {
      if (res.code == 200) {
        this.info = res.data
      }
    })
  },
  methods: {},
};
</script>
<style scoped lang="scss">
.box-card {
  margin-bottom: 10px;
}

.title {
  height: 28px;
  color: #303133;
  font-weight: 700;
  line-height: 28px;
  padding-left: 10px;
  display: flex;
  padding-left: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
  align-items: center;

  .title_box {
    width: 200px;
    display: flex;
    align-items: center;

    .title_icon {
      width: 4px;
      height: 18px;
      background-color: #d26454;
      border-radius: 4px;
      margin-right: 10px;
    }
  }

  .title_more {
    width: 24px;
    height: 28px;

    .more_img {
      display: inline-block;
      width: 24px;
      height: 28px;
    }
  }
}

.device_detail {
  .deviceStic_item {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 120px;
    border-radius: 10px;

    .deviceStic_item_lf {
      .deviceStic_title {
        height: 25px;
        font-size: 14px;
        font-weight: 500;
        line-height: 25px;
      }

      .deviceStic_num {
        height: 33px;
        font-size: 18px;
        font-weight: 600;
        line-height: 33px;
      }
    }

    .deviceStic_icon {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 80px;
      width: 28%;

      img {
        width: 50px;
        height: 50px;
      }
    }
  }

  .deviceStic_item1 {
    background: linear-gradient(135deg, #fff, #fffaed);

    .deviceStic_title,
    .deviceStic_num {
      color: rgb(255, 165, 43);
    }
  }

  .deviceStic_item2 {
    background: linear-gradient(135deg, #fdfafa, #eafffa);

    .deviceStic_title,
    .deviceStic_num {
      color: rgb(44, 207, 167);
    }
  }

  .deviceStic_item3 {
    background: linear-gradient(135deg, #fdfafa, #eaf2ff);

    .deviceStic_title,
    .deviceStic_num {
      color: rgb(44, 112, 255);
    }
  }
}
</style>
